{% extends "base.html" %}

{% block head-title %}{{algorithm.algorithm_name}}{% endblock %}

{% block title %}{{algorithm.algorithm_name}}{% endblock %} 

{% block content %}
<form action="/classifier/configure_parameters/" method="post" class="uk-form" id="form1"
					onsubmit="return true;">
	{%csrf_token%}
	<input type="hidden" name="instance_id" value="{{algorithm.instance_id}}"/>
	<fieldset>
		<legend>配置参数(3/4)</legend>
			{% ifequal algorithm.algorithm_name "KNN近邻法" %}
				<div class="uk-form-row">
					<div class="uk-form-controls">
						设定K值:<input type="number" value="5" name="k_value" />
					</div>
				</div>
			{% endifequal %}
			
			{% ifequal algorithm.algorithm_name "朴素贝叶斯" %}
				<div class="uk-form-row">
					<div class="uk-form-controls">
						模型选择:
						<select name="model_type">
							<option value="GaussianNB">高斯模型(GaussianNB)</option>
							<option value="BernoulliNB">伯努利模型(BernoulliNB)</option>
							<option value="MultinomialNB">多项式模型(MultinomialNB)</option>
						</select>
					</div>
				</div>
			{% endifequal %}
			
			{% ifequal algorithm.algorithm_name "决策树" %}
				<div class="uk-form-row">
					<div class="uk-form-controls">
						特征选择标准:
						<select name="criterion">
							<option value="gini">基尼系数(gini)</option>
							<option value="entropy">信息熵(entropy)</option>
						</select>
					</div>
				</div>
				<div class="uk-form-row">
					<div class="uk-form-controls">
						最大深度:<input type="number" value="" name="max_depth" placeholder="为空表示不考虑"/>
					</div>
				</div>
			{% endifequal %}
			
			{% ifequal algorithm.algorithm_name "支持向量机" %}
				<div class="uk-form-row">
					<div class="uk-form-controls">
						核函数:
						<select name="kernel">
							<option value="rbf">高斯核函数(rbf)</option>
							<option value="linear">线性核函数(linear)</option>
							<option value="poly">多项式核函数(poly)</option>
						</select>
					</div>
				</div>
			{% endifequal %}
			
			{% ifequal algorithm.algorithm_name "多层神经网络" %}
				<div class="uk-form-row">
					<div class="uk-form-controls">
						最优化算法:
						<select name="solver">
							<option value="adam">改进版随机梯度下降法(adam)</option>
							<option value="sgd">传统随机梯度下降法(sgd)</option>
							<option value="lbfgs">伪牛顿算法(lbfgs)</option>
						</select>
					</div>
				</div>
			{% endifequal %}
		<div class="uk-form-row">
			<div class="uk-form-controls">
				训练样本:<input type="number" value="80" name="train_size" />(%)
			</div>
		</div>
		<div class="uk-form-row">
			<div class="uk-form-controls">
				测试样本:<input type="number" value="20" name="test_size" />(%)
			</div>
		</div>
	</fieldset>
	<div class="uk-form-row" style="margin-top:5px;">
		<a href="javascript:history.go(-1);" class="uk-button">上一步</a>
		<input class="uk-button uk-button-primary" type="submit"
			value="下一步" style="float: right;">
	</div>
</form>
{% endblock %}